package util;

/**
 * @author yding5
 */
public class Util {

    private static long TIME = 0;

    public static void print(Object content) {
        System.out.println(Thread.currentThread().getName() + "=========" + content);
    }

    public static void sleep(long millSeconds) {
        try {
            Thread.sleep(millSeconds);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void timeWatch() {
        if (TIME == 0) {
            TIME = System.currentTimeMillis();
        } else {
            Util.print(System.currentTimeMillis() - TIME);
            TIME = 0;
        }
    }

}
